<?php
require_once ROOT_PATH.'/include/db/topic.db.php';
//require_once ROOT_PATH.'/include/db/tag.db.php';
class changesql_db{
	var $sql;
	var $mysql;
	function  changesql_db($mysql,$sql){
		$this->sql=$sql;
		$this->mysql=$mysql;
		$this->fuc_changsql();
	}

	function fuc_changsql(){
		$sql = trim($this->sql);
		$sql = preg_replace('/\r|\n|\t/','', $sql);
		if (preg_match('/\bjishigou_topic\b/i', $sql)) {
			$topic_db = new topic_db($this->mysql,$sql);
			$this->sql = $topic_db->sql;
		}
		
	}


}
?>